c# textboxaccept only numbers

76

c# textboxaccept only numbers -

 private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
    {
        e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
    }

Comments

Submit
0 Comments